package net.bithappens.hnqe.query;

import java.net.URI;

public class Relation extends QueryElement implements ITypeElement{

	private String typeId;
		
	public Relation(String id, URI uri, String typeId) throws InvalidIdException {
		super(id, uri);
		this.typeId = typeId;
	}

	public AtomAttribute getRelationTypeAttribute(){
		return new AtomAttribute(this, "@typeId");
	}
	
	public AtomAttribute getProperty(String name) {
		return new AtomAttribute(this, name);
	}

	@Override
	public String toString() {
		return "[Relation| id="+getId()+" uri="+getUri()+" typeId=" + typeId + "]";
	}

	@Override
	public String getTypeId() {
		return typeId;
	}
	
}
